package com.sservice.service.service.impl;

import com.sservice.model.dao.IOfferDao;
import com.sservice.model.entity.Offer;
import com.sservice.model.vo.OfferVo;
import com.sservice.service.service.IOfferService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OfferServiceImpl implements IOfferService {

    private Logger logger = LoggerFactory.getLogger(this.getClass());

    @Autowired
    private IOfferDao dataDao;

    @Override
    public List<OfferVo> queryByPage(OfferVo user) {
        return dataDao.queryByPage(user);
    }


    @Override
    public int deleteByPrimaryKey(Integer id) {
        return dataDao.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(Offer record) {
        return dataDao.insert(record);
    }

    @Override
    public int insertSelective(Offer record) {
        return dataDao.insertSelective(record);
    }

    @Override
    public OfferVo selectByPrimaryKey(Integer id) {
        return dataDao.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(Offer record) {
        return dataDao.updateByPrimaryKeySelective(record);
    }

    @Override
    public int queryOfferByGoodsId(String goodsId) {
        return dataDao.queryOfferByGoodsId(goodsId);
    }

    @Override
    public List<OfferVo> queryByPagePC(OfferVo user) {
        return dataDao.queryByPagePC(user);
    }

    @Override
    public int queryCountPC(OfferVo user) {
        return dataDao.queryCountPC(user);
    }

    @Override
    public List<OfferVo> queryByPagePCFocus(OfferVo user) {
        return dataDao.queryByPagePCFocus(user);
    }

    @Override
    public int queryCountPCFocus(OfferVo user) {
        return dataDao.queryCountPCFocus(user);
    }

    @Override
    public int queryCountByGoodsId(Offer user) {
        return dataDao.queryCountByGoodsId(user);
    }

    @Override
    public int queryCountMyOfferByCreatorId(Offer user) {
        return dataDao.queryCountMyOfferByCreatorId(user);
    }

    @Override
    public int selectByDeliverPlaceIds(Offer offer) {
        return dataDao.selectByDeliverPlaceIds(offer);
    }

    @Override
    public int queryCount(OfferVo user) {
        return dataDao.queryCount(user);
    }


}
